Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support ssl context #31

Merged
merged 1 commit into from
Aug 23, 2024
Merged

Support ssl context #31

merged 1 commit into from
Aug 23, 2024

Conversation

oeway
Copy link
Owner

@oeway oeway commented Aug 23, 2024

This allows passing custom ssl when connection to the server.

If you have a custom (self-signed ssl certificate), you can download the certificate as .pem from e.g. chrome, and use it as:

import ssl
from hypha_rpc.sync import connect_to_server

# Path to your .pem file
pem_file = "/path/to/your/certificate.pem"

# Create an SSL context
ssl_context = ssl.create_default_context()

# Load the .pem file into the SSL context
ssl_context.load_verify_locations(cafile=pem_file)

server = connect_to_server({"server_url": "https://your-host.org", "ssl": ssl_context})

@oeway oeway merged commit 15819db into main Aug 23, 2024
2 of 6 checks passed
@oeway oeway deleted the support-ssl branch August 23, 2024 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant